package com.zhang;

/**
 * @Author 弯冬水
 * @Date 2023/6/27 14:17
 * @Description: TODO
 * @Version 1.0
 */
public class TestNumber {
    public static boolean isNumber(String str){
        String reg = "^[0-9]+(.[0-9]+)?$";
        return str.matches(reg);
    }

    public static void main(String[] args) {
        System.out.println("isNumber(\"ddd\") = " + isNumber("\n" +
                "12"));
    }
}

